package com.engine.salary.entity.salarysob.dto;

import com.cloudstore.eccom.pc.table.WeaTableType;
import com.engine.salary.annotation.SalaryTable;
import com.engine.salary.annotation.SalaryTableColumn;
import com.engine.salary.annotation.SalaryTableOperate;
import com.engine.salary.annotation.TableTitle;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
import java.util.Set;

/**
 * 薪资账套列表
 * <p>Copyright: Copyright (c) 2022</p>
 * <p>Company: 泛微软件</p>
 *
 * @author qiantao
 * @version 1.0
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@SalaryTable(pageId = "b4f85287-e3f9-4d11-adn9-7d06e54y6rj8", tableType = WeaTableType.CHECKBOX, operates = {
        @SalaryTableOperate(index = "0", text = "编辑"),
        @SalaryTableOperate(index = "1", text = "复制"),
        @SalaryTableOperate(index = "2", text = "操作日志"),
        @SalaryTableOperate(index = "3", text = "关联人员"),
        @SalaryTableOperate(index = "4", text = "删除")
})
public class SalarySobListDTO {

    //主键id
    @JsonSerialize(using = ToStringSerializer.class)
    @SalaryTableColumn(column = "id", display = false)
    private Long id;

    @SalaryTableColumn(text = "账套名称", width = "10%", column = "name")
    @TableTitle(title = "账套名称", key = "name", dataIndex = "name")
    private String name;

    @SalaryTableColumn(text = "个税扣缴义务人", width = "10%", column = "taxAgentName")
    @TableTitle(title = "个税扣缴义务人", key = "taxAgentName", dataIndex = "taxAgentName")
    private String taxAgentName;

    // 个税扣缴义务人ID
    private List<Long> taxAgentIds;

    @SalaryTableColumn(text = "薪资周期", width = "10%", column = "salaryCycle", transmethod = "com.engine.salary.transmethod.TransMethod.buildSalaryCycle", otherPara = "column:salaryCycleFromDay")
    @TableTitle(title = "薪资周期", key = "salaryCycle", dataIndex = "salaryCycle")
    private String salaryCycle;

    @SalaryTableColumn(text = "薪资周期起始日期", width = "10%", column = "salaryCycleFromDay", display = false)
    private String salaryCycleFromDay;

    @SalaryTableColumn(text = "启用", width = "10%", column = "disable")
    @TableTitle(title = "启用", key = "disable", dataIndex = "disable")
    private Integer disable;

    @SalaryTableColumn(text = "备注", width = "10%", column = "description")
    @TableTitle(title = "备注", key = "description", dataIndex = "description")
    private String description;

    @SalaryTableColumn(text = "操作", width = "20%", column = "operate")
    @TableTitle(title = "操作", key = "operate", dataIndex = "operate")
    private Set<String> opts;
}
